%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Calcul de l'interpolation en un point sur élément de référence [0,1]
%   entrée:
%       - valeurs aux noeuds: uh
%       - point relatif ou on veut l'interpolation: p
%   sortie:
%       - valeurs au point interpolé: u  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [u] = Valeur_interpolee (uh,p,h)

u(1) =  (1-3*p^2+2*p^3)*uh(1) + ...
        (p-2*p^2+p^3)*uh(2)*h  + ...
        (3*p^2-2*p^3)*uh(3) + ...
        (-p^2+p^3)*uh(4)*h ;
    
u(2) =  (-6*p+6*p^2)*uh(1) +...
        (1-4*p+3*p^2)*uh(2)*h +...
        (6*p-6*p^2)*uh(3) +...
        (-2*p+3*p^2)*uh(4)*h;
end